Learning By Examing & Borrowing/Creating from Bits & Pieces.

Once you are ready to begin constructing your own stacks, or even while experimenting with your practice stack, you will want to borrow a button, sound, field, script, background or some other element from a stack.  Doing so can involve four processes or tools: cutting and pasting, moving resources, examining cards and exporting scripts from stacks so they can be examined with a word processor.  All four are relatively easy to use because they involve processes common to the Mac user interface.

Cutting & Pasting

You can copy buttons, graphics, backgrounds, fields, texts, etc., from one stack to another simply by

  1.  selecting it

2.  copying it

3.  going to the other stack

4.  pasting it.

The only thing that really varies in this process is the tool you select to begin.  If you want to copy a button, you select the "button tool" from the tool box, "select" the button you want to copy, press [command + c] to copy it, more to the stack you want to copy to, and press [command + v] to paste it.  You may need to move it to the position you want. 

To copy a graphic, select the lasso tool or "selection" tool (looks like a box), encircle the box or graphic you want to copy, press [command + c] to copy it, more to the stack you want to copy to, and press [command + v] to paste it.  You may need to move it to the position you want.

Copying a background is done the same way except that you have to be sure you are in the background layer and that you paste what you capture to the background layer of your new stack.   Press [command b] to go to the background layer and [command b] to leave it.

Even cards can be copied in much the same way except you have to select "copy card" from the edit pull-down menu.  Once that is done, you can go to your knew stack and press [command v] to "paste" the card.  It will be pasted after the card you are on and will be pasted with its background, script and all other contents intact. 

Of course if you want to copy a stack's background for your entire stack, the easiest way to do that is to go to the stack you want to copy, and select "copy stack" from the "file" pull-down menu.  You'll be presented with a dialog box and can choose to copy the background of the original by checking the appropriate box. 

Copying (Moving) Resources

Some stack elements can't be moved with cutting and pasting.  The reasons involve too much to explain here, but they include sounds,  icons used with buttons, fonts for some other purposes, external commands (xcmds and xcfns).  For example, if you have a sound you want to play with a button on your stack that is not commonly available on your Mac, you need to attach it to the stack using the Resource Mover found in the Power Tools Stack which came with HyperCard 2.0.  These resources can be moved with ResCopy, ResEdit other programs.

While no xcmds have been included on this disk independently, the various stacks have some which can be copied to your stacks.  Look at the scripts of the stacks from which you get xcmds to see how they are accessed or "commanded".  (Check StackTools Disk 5 for a large number of xcmds complete with demonstrations and instructions.) 

Examining Stacks

You can always examine stacks by going to the stacks and going to the script of various elements to see how something is done.  Some key combinations that will help you (in addition to the combinations display beside the commands in the menus....the navigation commands in the "Go" menu are especially helpful) do that are

*****option-command   (makes all buttons on a card visible)
                  double click on one while it is visible to see it's script.

*****Double click on a button or field while that tool is selected to go                          
                  directly to that script.

*****option-command c    (shows card script)

*****option-command b    (shows background script)

*****option-command s    (shows stack script)

*****command-spacebar  (shows the menu bar)

*****command-tab  (chooses browser tool)

*****command-tab-tab (chooses button tool)

*****command-tab-tab-tab (chooses field tool)

*****command ~ (tilde)  (takes you to the last card you saw)

However, sometimes stacks are locked to prevent such examination and its not always easy to find the command that caused an effect, and sometimes you need to see all the scripts to understand what a stack does or how it works.  Two tools included in HyperCard 2.0's Power Tools can help in these situations.

The first is the "List Objects" tool.  HyperCard has to be told to include it in the command path by clicking on the "Use This Stack" button on the Power Tools menu, then following the prompts.  Follow instructions on the "List Objects" card.  It will display a list of all the buttons and fields on the card you are examining and its background.  You can examine and/or edit the scripts of listed buttons and fields.

The second tool is the "Export a Stack's Scripts" tool.  Various versions of this are around, but the one included in Power Tools works great.  This tool exports all of a stack's scripts into a single text file.  You can examine the file with a word processor or print it to examine at your leisure.  When examining the scripts with a word processor, you can copy portions into your scrapbook and then copy them into the appropriate place in your new stack to save typing.  Scripts are a text file in some senses.

These are just a few of the possibilities, but enough to get you started.  There's no substitute for examining stacks, tinkering, modifying, borrowing, etc., for learning how to use HyperCard.

A final note about borrowing and copying.  I'm constantly looking for art for various projects.  You can copy the art from any non copyrighted stack for your own use.  Start an art collection stack and copy art from various cards to that stack to make finding it easier later.  I do the same thing for sounds, icons, scripts, etc.